package com.zzt.spider.task;

import com.zzt.spider.service.SearchSpiderSourceService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
public class SpiderSourceTask {
    private static final Logger log = LoggerFactory.getLogger(SpiderSourceTask.class);
    @Autowired
    private SearchSpiderSourceService searchSpiderSourceService;

    @Scheduled(fixedDelay = 18000000L)
    public void run() {
        log.info("\ud83d\udd52 searchSpiderSourceService.getSource() 即将执行");
        this.searchSpiderSourceService.getSource();
        log.info("✅ searchSpiderSourceService.getSource() 执行结束");
    }
}
